<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>AUI快速完成布局</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="./css/footer.css" />
    <link rel="stylesheet" type="text/css" href="../font/iconfont.css" />
    <script src="../font/iconfont.js"></script>
</head>

<body>

  <header class="aui-bar aui-bar-nav" style="background:#ccc;" id="header">
      <div class="aui-content">
          <div class="aui-row">
              <div class="aui-col-xs-10 " id="menus" >

              </div>
              <div class="aui-col-xs-2 " id="menus-1">
                  购
              </div>
          </div>
      </div>
  </header>


    <!-- <header class="aui-bar aui-bar-nav aui-bar-light" id="header">
        <a class="aui-pull-left aui-btn" tapmode onclick="fnAnimation()">
            <span class="aui-iconfont aui-icon-menu" style="color:#ff4285"></span>
        </a>
        <div class="aui-title" style="color:#ff4285">免费试用</div>
    <a class="aui-pull-right aui-btn aui-btn-outlined">
            <span class="aui-iconfont aui-icon-search" style="color:#ff4285;" ></span>
        </a>
    </header> -->
    <footer class="aui-bar aui-bar-tab" id="footer">
    <div class="aui-bar-tab-item aui-active footer-tab" tapmode data-name="main" data-url="main.html">
       <svg class="icon svg-icon" aria-hidden="true">
      <use xlink:href="#iconsk-shouyeweixuanzhong">
      </svg>
      <!-- <svg class="icon svg-icon" aria-hidden="true">
        <use xlink:href="#iconsk-shouyexuanzhong">
      </svg> -->
        <div class="aui-bar-tab-label" style="color:black;">首页</div>
    </div>
    <div class="aui-bar-tab-item footer-tab" tapmode  data-name="task_center" data-url="task_center.html">
      <!-- <svg class="icon svg-icon" aria-hidden="true">
        <use xlink:href="#iconsk-mianfeishiyong">
      </svg> -->
   <svg class="icon svg-icon" aria-hidden="true">
    <use xlink:href="#iconsk-mianfeishiyongxuanzhong">
    </svg>
        <div class="aui-bar-tab-label" style="color:#ff4285">全部</div>
    </div>
    <div class="aui-bar-tab-item footer-tab" tapmode  data-name="member_friend" data-url="member_friend.html">

    <svg class="icon svg-icon" aria-hidden="true">
      <use xlink:href="#iconsk-fenxiangyoujiang-copy">
      </svg>
     <!-- <svg class="icon svg-icon" aria-hidden="true">
  <use xlink:href="#iconsk-fenxiangyoujiang">
  </svg> -->
        <div class="aui-bar-tab-label" >邀请</div>
    </div>
    <div class="aui-bar-tab-item footer-tab" tapmode  data-name="task_ing" data-url="task_ing.html">

       <svg class="icon svg-icon" aria-hidden="true">
          <use xlink:href="#iconsk-zhibolishi-copy">
        </svg>
       <!-- <svg class="icon svg-icon" aria-hidden="true">
  <use xlink:href="#iconsk-zhibolishi">
  </svg> -->
        <div class="aui-bar-tab-label" >试用进展</div>
    </div>
    <div class="aui-bar-tab-item footer-tab" tapmode data-name="person_center" data-url="person_center.html">
      <svg class="icon svg-icon" aria-hidden="true">
        <use xlink:href="#iconsk-zhanghaoweixuanzhong">
      </svg>
     <!-- <svg class="icon svg-icon" aria-hidden="true">
      <use xlink:href="#iconsk-zhanghaoxuanzhong">
      </svg> -->
        <div class="aui-bar-tab-label" >我的</div>
    </div>
    </footer>
    <!-- <footer class="aui-bar aui-bar-tab" id="footer">
        <div class="aui-bar-tab-item  footer-tab" tapmode data-name="main" data-url="main.html">
            <i class="aui-iconfont aui-icon-home"></i>
            <div class="aui-bar-tab-label">首页</div>
        </div>
        <div class="aui-bar-tab-item footer-tab aui-active" tapmode data-name="task_center" data-url="task_center.html">
            <i class="aui-iconfont aui-icon-star"></i>
            <div class="aui-bar-tab-label">任务中心</div>
        </div>
        <div class="aui-bar-tab-item footer-tab" tapmode data-name="member_friend" data-url="member_friend.html">

            <i class="aui-iconfont aui-icon-cart"></i>
            <div class="aui-bar-tab-label">邀请有奖</div>
        </div>
        <div class="aui-bar-tab-item footer-tab" tapmode data-name="task_ing" data-url="task_ing.html">
            <i class="aui-iconfont aui-icon-paper"></i>
            <div class="aui-bar-tab-label">任务进展</div>
        </div>
        <div class="aui-bar-tab-item footer-tab" tapmode data-name="person_center" data-url="person_center.html">
            <div class="aui-dot"></div>
            <i class="aui-iconfont aui-icon-my"></i>
            <div class="aui-bar-tab-label">我的</div>
        </div>
    </footer> -->
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="./conf/config.js"></script>
<script type="text/javascript" src="./js/common.js"></script>
<script type="text/javascript" src="../script/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
    apiready = function() {
init();
test();
        initEventListenner(); //退出键添加提示框




    };
    $("#footer .footer-tab").each(function() {
        $(this).click(function() {
          var name = $(this).attr("data-name");
         var url = $(this).attr("data-url");
         var userInfo = $api.getStorage('userInfo');

         var is_login = userInfo;
         //if(typeof(is_login)=="undefined"){

         //alert(JSON.stringify(is_login));return false;
         //alert(is_login.userid);return false;
         if (name == "person_center" || name == "task_ing") {
             if (typeof(is_login) == "undefined") {
                 api.openWin({
                     name: "login",
                     url: "./login.html",
                     opaque: true,
                     vScrollBarEnabled: false

                 });

             }
         }

         api.openWin({
             name: name,
             url: url,
             opaque: true,
             vScrollBarEnabled: false
         });

        });
    });
function init(){
  var header = $api.byId('header');
  $api.fixStatusBar($api.dom('header'));
  api.setStatusBarStyle({
      style: 'dark',
     color:'transparent'
  });
  var menus = $api.byId('menus');
  var menus1 = $api.byId('menus-1');
  menusHeight = $api.offset(menus).h;
  menusTop = $api.offset(menus).w;
  menus1Height = $api.offset(menus1).h;
  menus1Top = $api.offset(menus1).w;
  var headerH = $api.offset(header).h;
  var footer = $api.byId('footer');
  var footerH = $api.offset(footer).h;
  api.openFrame({
      name: 'task_center_frame',
      url: './task_center_frame.html',
      rect: {
          x: 0,
          y: headerH,
          w: 'auto',
          h: api.winHeight - footerH - headerH,
      },
      pageParam: {
          wareId: api.pageParam.wareId
      },
      bounces: true
  });

}
    function initEventListenner() {

        api.addEventListener({
            name: 'keyback'
        }, function(ret, err) {

        });
    };
    function fnAnimation(){
      var jsfun = 'fnAnimationLeft();';
      api.execScript({
          frameName: 'task_center_frame',
          script: jsfun
      });
    }
    function fnOpenWin(){
      api.openWin({
          name: 'good_search',
          url: './good_search.html',
          pageParam: {
              name: 'test'
          }
      });

    }
//顶部导航
function test() {
    var NVNavigationBar = api.require('NVNavigationBar');

    NVNavigationBar.open({
        rect: {
            x: 0,
            y: 0,
            w: menusTop,
            h: headerHeight,
        },
        styles: {
            orientation: 'horizontal',
            bg: '#6b6b6b',
            bgAlpha: 1,
            font: {
                size: 14,
                sizeSelected: 18,
                color: '#FFFFFF',
                colorSelected: '#ff0000',
                alpha: 1
            },
            itemSize: {
                w: 90,
                h: 44
            }
        },
        items: [{
            title: '全部',
            bg: '#FFE7BA',
            bgSelected: '#ff0000'
        }, {
            title: '男装',
            bg: '#FFE1FF',
            bgSelected: '#FFA500'
        }, {
            title: '女装',
            bg: '#FFAEB9',
            bgSelected: '#FFA500'
        }, {
            title: '标题四',
            bg: '#CDCD00',
            bgSelected: '#FFA500'
        }, {
            title: '标题五',
            bg: '#BBFFFF',
            bgSelected: '#FFA500'
        }, {
            title: '标题六',
            bg: '#436EEE',
            bgSelected: '#FFA500'
        }],
        selectedIndex: 1,
        fixedOn: api.frameName,
        id: 'first'
    }, function(ret, err) {
        api.alert({
            msg: JSON.stringify(ret)
        });
    });
}
</script>

</html>
